// components-biz/vertical-tabs-content/index.js
const { BaseBehavior, COMPONENT_OPTIONS } = require('../../mixins/component');
Component({
    behaviors: [BaseBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        tabIndex: {
            type: Number,
            value: 0,
        },
    },
    relations: {
        '../vertical-tabs/index': {
            type: 'parent', // 关联的目标节点应为父节点
        },
    },
    methods: {
        // 计算高度
        calcHeight(callback) {
            const query = this.createSelectorQuery()
            query.select('.mini-vertical-tabs-content__item').boundingClientRect((rect) => {
                callback && callback(rect)
            }).exec();
        },
    }
})
